const path = require('path');
let url = ''
if (process.env.NODE_ENV == 'development') {
    url = path.join(__dirname, `../../../../../../static`)
} else {
    url = path.join(__dirname, `../../static/`)
}
let src = 'custom:///' + path.join(url, '/musice/sound.mp3').replace(/\\/g, '/')
let musiceAudio = new Audio()
musiceAudio.src = src;
// 播放音频
function playAudio() {
    musiceAudio.play();
}

//停止播放音频
function stopAudio() {
    musiceAudio.pause();
}
export { playAudio, stopAudio }